package com.example.springdata.multithread;

public class KillHero extends Thread {
    private Hero h1;
    private Hero h2;
    public KillHero(Hero h1,Hero h2){
        this.h1=h1;
        this.h2=h2;
    }

    @Override
    public void run() {
       while(!h2.isDead()){
           h1.attachHero(h2);
       }
    }
}
